package com.example.sherlockzhong.plush_v2.Utils;

/*
 * Created by Administrator on 2014/9/14.
 */
public class PreventFastClickUtil {
    private static long lastClickTime = 0;
    private static long interval = 1000;

    public static long getInterval() {
        return interval;
    }

    public static void setInterval(long interval) {
        PreventFastClickUtil.interval = interval;
    }

    public static boolean isFastDoubleClick() {
        long time = System.currentTimeMillis();
        long timeD = time - lastClickTime;
        if (0 < timeD && timeD < interval) {
            return true;
        }
        lastClickTime = time;
        return false;
    }

}
